﻿<Window x:Class="WebFlipScreenSaver.View.Settings"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		Title="Settings" Height="524" Width="753" xmlns:my="clr-namespace:WebFlipScreenSaver.View">
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="106*" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<ListBox   Name="WebSiteConfigurationsListBox" Grid.RowSpan="1" 
				   AlternationCount="{Binding Path=WebsiteConfigurations.Count}" 
				   SelectedItem="{Binding Path=SelectedWebSiteConfiguration, Mode=TwoWay}" 
				   ItemsSource="{Binding WebsiteConfigurations}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding ListDisplayName}" />					
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
		<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
			<Button  HorizontalAlignment="Right" Content="Delete selected website Configuration" Margin="5" Command="{Binding DeleteConfigCommand}" IsEnabled="{Binding CanDelete}"/>
			<Button  HorizontalAlignment="Right" Content="Add new website Configuration" Margin="5" Command="{Binding AddConfigCommand}"/>

		</StackPanel>
				<my:WebPageConfigurationView Grid.Row="2" HorizontalAlignment="Stretch" DataContext="{Binding SelectedWebSiteConfiguration, Mode=TwoWay}"
									 x:Name="webPageConfigurationView1" VerticalAlignment="Stretch" Height="300" />
		
		<Button Grid.Row="3" HorizontalAlignment="Right" Content="Save Configuration" Margin="5" Command="{Binding SaveConfigCommand}"/>
	</Grid>
</Window>
